WindwardReports Utility Reference
The WindwardReports.jar file that is part of the Java Report Engine installation includes some useful utilities.
#
CheckJdbcnet.windward.tools.CheckJdbc checks what JDBC parameters to use when connecting to a database. Parameters are:
- jdbc_classpath - the classpath for the JDBC driver. Examples are:
- SQL Server: com.microsoft.jdbc.sqlserver.SQLServerDriver
- Oracle: oracle.jdbc.driver.OracleDriver
- database_name - the connection string used to connect to a specific database. Examples are:
- SQL Server: com.microsoft.jdbc.sqlserver.SQLServerDriver
- Oracle: jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=database_name
- username [optional] - The username used when connecting to the database
- password [optional] - The password used when connecting to the database
#
JoinReportsJoinReports.joinPdf() combines output from multiple Report Templates into a single PDF document.
This operates differently from importing multiple templates into a master DOCX or XLSX template.
When you use the Import Tag, the imported template is converted into an element in the master template. For example, importing an XLSX file into a DOCX file converts the worksheets into Word tables. A Word table does not have the concept of hidden rows/columns, etc. and so that meta information is lost.
JoinReports keeps each document in its native template format. Each is then output to PDF and the PDF pages are then joined together in a single PDF document. This way you can combine DOCX and XLSX templates and both render their PDF pages as they would directly.
The API is passed an array of ProcessReport objects (and an OutputStream for the generated PDF report). If you are combining a number of static documents this is overkill and requires a couple of additional lines of code. However, if you want to build up distinct reports, applying data to templates, then combine those generated reports, this supports that use case.
#
ListServersnet.windward.tools.ListServers (no parameters) will list out all Windward servers running on the network listing their version number, IP address, and server name (repeating the IP address if it has no name).
#
OutTagFormatnet.windward.tools.OutTagFormat is a quick way to find what format a <wr:out …/>
tag will generate for a given string, type and pattern attributes. It also displays the output generated both by Windward Reports and the underlying Java classes. Both are displayed because some Java implementations differ in their formatted output, and this is something Windward Reports cannot control.
#
RunReportGenerate output from a Report Template. This is a sample program that generates output from the command line. An example is:
Usage:
#
ShowFontsnet.windward.tools.ShowFonts will display all fonts Java is aware of on your system. Run this and if it throws an exception, then there is a bug in the Java font layout code and there is no way Windward can do a work around. The source code to this class is in WindwardReports.jar.
This class makes no calls to Windward. If this program cannot run, then it is a Java bug, not a Windward bug
#
UUEncodenet.windward.util.UUEncode will uuencode a file. This is useful for uuencoding bitmap files that will be placed directly in an XML file. To create a uuencoded file, run the program as “java net.windward.util.UUEncode image.jpg image.uue”
- image.jpg - the binary file to uuencode.
- image.uue - the created file that is a uuencode of the binary file.
#
XMLPerfnet.windward.tools.XmlPerf will read in an XML file and evaluate an XPath search. It lists the time and memory footprint both before and after to give a measure of how fast dom4j can handle files of a given size and complexity.